package com.chencong.transform;

import com.chencong.env.FlinkTableEnv;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author chencong
 * @Description 随机打乱
 * @Date 7:40 下午 2021/8/18
 * @Param
 **/
public class Shuffle {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment streamTableEnvironment = FlinkTableEnv.getStreamTableEnvironment();
        streamTableEnvironment.setParallelism(1);

        streamTableEnvironment
                .fromElements(10, 3, 5, 9, 20, 8)
                .shuffle()
                .print();

        streamTableEnvironment.execute();
    }
}
